/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cr.ac.una.sive.entidad;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author claribel
 */
@Entity
@Table(name = "CONFIGURACION_SIVE", catalog = "", schema = "UNA_SIVE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ConfiguracionSive.findAll", query = "SELECT c FROM ConfiguracionSive c"),
    @NamedQuery(name = "ConfiguracionSive.findByNombreSistema", query = "SELECT c FROM ConfiguracionSive c WHERE c.nombreSistema = :nombreSistema"),
    @NamedQuery(name = "ConfiguracionSive.findByMarchamosEntregados", query = "SELECT c FROM ConfiguracionSive c WHERE c.marchamosEntregados = :marchamosEntregados"),
    @NamedQuery(name = "ConfiguracionSive.findByNumeroMaxMarchamos", query = "SELECT c FROM ConfiguracionSive c WHERE c.numeroMaxMarchamos = :numeroMaxMarchamos"),
    @NamedQuery(name = "ConfiguracionSive.findById", query = "SELECT c FROM ConfiguracionSive c WHERE c.id = :id")})
public class ConfiguracionSive implements Serializable {
    private static final long serialVersionUID = 1L;
    @Size(max = 100)
    @Column(name = "NOMBRE_SISTEMA", length = 100)
    private String nombreSistema;
    @Column(name = "MARCHAMOS_ENTREGADOS")
    private BigInteger marchamosEntregados;
    @Column(name = "NUMERO_MAX_MARCHAMOS")
    private BigInteger numeroMaxMarchamos;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID", nullable = false, precision = 0, scale = -127)
    private BigDecimal id;

    public ConfiguracionSive() {
    }

    public ConfiguracionSive(BigDecimal id) {
        this.id = id;
    }

    public String getNombreSistema() {
        return nombreSistema;
    }

    public void setNombreSistema(String nombreSistema) {
        this.nombreSistema = nombreSistema;
    }

    public BigInteger getMarchamosEntregados() {
        return marchamosEntregados;
    }

    public void setMarchamosEntregados(BigInteger marchamosEntregados) {
        this.marchamosEntregados = marchamosEntregados;
    }

    public BigInteger getNumeroMaxMarchamos() {
        return numeroMaxMarchamos;
    }

    public void setNumeroMaxMarchamos(BigInteger numeroMaxMarchamos) {
        this.numeroMaxMarchamos = numeroMaxMarchamos;
    }

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConfiguracionSive)) {
            return false;
        }
        ConfiguracionSive other = (ConfiguracionSive) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cr.ac.una.sive.entidad.ConfiguracionSive[ id=" + id + " ]";
    }
    
}
